package com.itheima.threadtest6_1;

import java.util.ArrayList;
import java.util.Collections;

/**
 * 抽奖 并打印
 */
public class ThreadDemo {

    public static void main(String[] args) {
        ArrayList<Integer> list = new ArrayList<>() ;

        Collections.addAll(list , 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25);

        MyThread mythread1 = new MyThread(list);
        MyThread mythread2 = new MyThread(list);

        mythread1.setName("抽奖箱1");
        mythread2.setName("抽奖箱2");

        mythread1.start();
        mythread2.start();
    }
}
